package com.ruicar.afs.cloud.workflow.greatwall.processor.impl.msg;

import com.ruicar.afs.cloud.workflow.greatwall.component.GwtProcessComponent;
import com.ruicar.afs.cloud.workflow.greatwall.dto.GwtRequest;
import com.ruicar.afs.cloud.workflow.greatwall.enums.GwtMsgType;
import com.ruicar.afs.cloud.workflow.greatwall.processor.AbsBaseProcessor;
import com.ruicar.afs.cloud.workflow.greatwall.processor.GwtFlowProcessor;
import com.ruicar.afs.cloud.workflow.greatwall.service.AfsGreatWallWorkflowBizDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class FlowErrorProcess  extends AbsBaseProcessor implements GwtFlowProcessor {
    public FlowErrorProcess(AfsGreatWallWorkflowBizDataService afsGreatWallWorkflowBizDataService) {
        super(afsGreatWallWorkflowBizDataService);
    }

    @Override
    public GwtMsgType msgType() {
        return GwtMsgType.FLOW_EXCEPTION_NOTICE;
    }

    @Override
    public String process(GwtRequest req) {
        return GwtProcessComponent.gwtObjProcessor(req.getMsgType(), req.getObjectCode()).process(req);
    }
}
